Skip to content

fix(get-next-bump): fix to permit usage of --get-next option even when update_changelog_on_bump is set to true #1301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 26, 2025

Conversation

Lowaiz
Copy link
Contributor

@Lowaiz Lowaiz commented Nov 29, 2024

Description

With the configuration options update_changelog_on_bump set to True, the command cz bump --get-next crashed, due to the mutual exclusive options --get-next and --changelog/--changelog-to-stdout.

Changing this behavior to still throw a conflict when using both CLI options, but let --get-next take the precedence over update_changelog_on_bump configuration.

Checklist

  • Add test cases to all the changes you introduce
  • Run ./scripts/format and ./scripts/test locally to ensure this change passes linter check and test
  • Test the changes on the local machine manually
  • Update the documentation for the changes

Expected behavior

Now the configuration options update_changelog_on_bump can be set to whatever you want when using the cz bump --get-next command.

Steps to Test This Pull Request

  1. Build a commitizen config with update_changelog_on_bump flag set to true.
  2. Add some commits to the target test project.
  3. Run cz bump --get-next
  4. The command should work and not throw an error.

Additional context

Copy link

codecov bot commented Nov 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.55%. Comparing base (120d514) to head (e5d6797).
Report is 531 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1301      +/-   ##
==========================================
+ Coverage   97.33%   97.55%   +0.21%     
==========================================
  Files          42       55      +13     
  Lines        2104     2613     +509     
==========================================
+ Hits         2048     2549     +501     
- Misses         56       64       +8     
Flag Coverage Δ
unittests 97.55% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Lowaiz Lowaiz changed the title fix(get-next-bump): fix to permit usage of --get-next options even when update_changelog_on_bump is set to true fix(get-next-bump): fix to permit usage of --get-next option even when update_changelog_on_bump is set to true Nov 29, 2024
@Lowaiz Lowaiz requested a review from Lee-W December 11, 2024 09:01
@Lowaiz
Copy link
Contributor Author

Lowaiz commented Jan 23, 2025

@Lee-W @noirbizarre @woile
Hello,
Can one of you review this PR ?
As I did not receive any update on my response to the comment, I try the direct ping, sorry for the inconvenience !

@Lee-W
Copy link
Member

Lee-W commented Jan 24, 2025

@Lee-W @noirbizarre @woile Hello, Can one of you review this PR ? As I did not receive any update on my response to the comment, I try the direct ping, sorry for the inconvenience !

Will take a look these days. Thanks for reminding me!

@Lee-W Lee-W merged commit d20580d into commitizen-tools:master Jan 26, 2025
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants